home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Marlais / Marlais 0.5.9-portable sources / list.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  2.6 KB  |  76 lines  |  [TEXT/ttxt]

  1. /*
  2.  
  3.    list.h
  4.  
  5.    This software is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License as published by the Free Software Foundation; either
  8.    version 2 of the License, or (at your option) any later version.
  9.  
  10.    This software is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with this software; if not, write to the Free
  17.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.    Original copyright notice follows:
  20.  
  21.    Copyright, 1993, Brent Benson.  All Rights Reserved.
  22.    0.4 & 0.5 Revisions Copyright 1994, Joseph N. Wilson.  All Rights Reserved.
  23.  
  24.    Permission to use, copy, and modify this software and its
  25.    documentation is hereby granted only under the following terms and
  26.    conditions.  Both the above copyright notice and this permission
  27.    notice must appear in all copies of the software, derivative works
  28.    or modified version, and both notices must appear in supporting
  29.    documentation.  Users of this software agree to the terms and
  30.    conditions set forth in this notice.
  31.  
  32.  */
  33.  
  34. #ifndef LIST_H
  35. #define LIST_H
  36.  
  37. #include <stdarg.h>
  38. #include "object.h"
  39.  
  40. #ifndef SMALL_OBJECTS
  41. Object make_empty_list (void);
  42.  
  43. #else
  44. #define make_empty_list() EMPTYLISTVAL
  45. #endif
  46.  
  47. void init_list_prims (void);
  48. void initialize_empty_list (void);
  49. Object make_pair_driver (Object args);
  50. Object make_list_driver (Object args);
  51. Object cons (Object car, Object cdr);
  52. Object second (Object lst);
  53. Object third (Object lst);
  54. Object map (Object (*fun) (Object), Object lst);
  55. Object map2 (Object (*fun) (Object, Object), Object l1, Object l2);
  56. Object list_map1 (Object fun, Object lst);
  57. Object list_map2 (Object fun, Object l1, Object l2);
  58. Object append (Object l1, Object l2);
  59. int member (Object obj, Object lst);
  60. Object member_p (Object obj, Object lst, Object test);
  61. Object listem (Object car,...);
  62. Object list_reduce (Object fun, Object init, Object lst);
  63. Object list_reduce1 (Object fun, Object lst);
  64. Object list_length_int (Object lst);
  65. int list_length (Object lst);
  66. int list_equal (Object l1, Object l2);
  67. Object list_reverse (Object lst);
  68. Object list_reverse_bang (Object lst);
  69. Object copy_list (Object lst);
  70.  
  71. Object add_new_at_end (Object *lst, Object elt);
  72. Object list_sort (Object lst, Object test);
  73. Object list_sort_bang (Object lst, Object test);
  74.  
  75. #endif
  76.